		/* If you uncheck a box */		
		function warnUser(id) {
			if(!document.getElementById(id).checked) {
				alert("If you uncheck this box, the changes will not be applied!");
			}
		}
		/* Is on every change called (for textfields and checkboxes */
		function checkAndWarn(id) {
			checkBox();
			warnUser(id);
		}
		/* Checks locks or unlocks buttons */
		function checkBox() {
			/* Counts the SELECTED checkboxes with id cb_XXX */
			cnt = countCnt();
			/* Action for the save, delete, vote and change button */
			sve(cnt);
			del(cnt);
			vote(cnt);
			change(cnt);
		}
		/* If you change something in the textfield, the checkbox on left is checked */
		function setCheckBox(FieldName) {
			var FieldNameArray = FieldName.split("_");
			var id = FieldNameArray[2];
			document.getElementById("cb_"+id).checked = true;

		}
		/* Counts all selected boxes */
		function countCnt() {
			cnt = 0;
			for(i = 1; i <= 2; i++) {
				box = document.getElementById("cb_"+i);
				if(box.checked) { cnt++; }
			}
			return cnt;
		}
		/* Returns the first selected checkbox */
		function getFirstSelectedCheckBox() {
			for(i = 1; i <= 2; i++) {
				box = document.getElementById("cb_"+i);
				if(box.checked) { return i; }
			}
			return -1;
		}		
		/* Next three functions enable delete, save and vote if in minimum one checkbox is selected */
		function del(cnt) {
			document.getElementById("dlt").disabled = (cnt==0);
		}

		function sve(cnt) {
			document.getElementById("sve").disabled = (cnt==0);
		}
		
		function vote(cnt) {
			document.getElementById("vte").disabled = (cnt==0);
		}
		/* change(cnt) enables the change button, if only ONE checkbox is checked */
		function change(cnt) {
			var x = document.getElementById("chg");
			if(x != null) { x.disabled = (cnt!=1); }
		}
		/* Opens a new window (link, description) */
		function popup (url, desc) {
			fenster = window.open(url, desc, "width=500,height=300,resizable=yes,scrollbars=yes");
			fenster.focus();
			return false;
		}
